#include <iostream>
#include <string>
using namespace std;

int main() {
    string s;
    int flag = 1;
    int tmp[256] = { 0 };
    getline(cin, s);
    for (auto x : s)
    {
        tmp[(int)x]++;
    }
    for (auto x : s)
    {
        if (tmp[(int)x] == 1)
        {
            cout << x;
            flag = 0;
            break;
        }
    }
    if (flag)
    {
        cout << -1;
    }
    return 0;
}